{% extends "admin/base_site.html" %}
{% load i18n %}

{% block extrahead %}
    <script type="text/javascript" src="/static/js/jquery.autocomplete.js"></script> 
    <script type="text/javascript" src="/static/js/ajax_select.js"></script>
    <link rel="stylesheet" type="text/css" href="/static/css/jquery.autocomplete.css" /> 
    <link rel="stylesheet" type="text/css" href="/static/css/iconic.css" />
    
    {% load adminmedia %}
	<script type="text/javascript" src="/admin/jsi18n/"></script>
	<script type="text/javascript" src="/static/grappelli/js/core.js"></script>
    {{ formset.media }}
{% endblock %}

{% block breadcrumbs %}
<div class="breadcrumbs"> 
<a href="/admin"> 
Home
</a> 
&rsaquo; 
<a href="/admin/sis/studentattendance/"> 
 Student Attendance
</a> 
&rsaquo; Attendance Submissions</div> 
{% endblock %}

{% block content %}
	<h2> Today's Attendance Submissions </h2>
       <div class='table'>
            <table>
                <tr>
                    <th>Course</th>
                    <th>Teacher</th>
                    <th>Submitted?</th>
                </tr>
                {% for submission in submissions %}
                <tr>
                    <td><a href="/admin/schedule/course/{{ submission.id }}/">{{ submission.homeroom }}</a></td>
                    <td>{{ submission.teacher }}</td>
                    <td>{{ submission.submitted }}</td>
                </tr>
                {% endfor %}
            </table>
        </div>
       <br/><br/>
     <div class='table'>
      <h4> Students in ASP today. </h4>
            <table>
                <tr>
                    <th>Student</th>
                    <th>Course</th>
                    <th>Teacher</th>
                </tr>
                {% for course in courses %}
		 {% for enroll in course.courseenrollment_set.all %}
                <tr>
                    <td>{{  enroll.user }}</td>
		    <td>{{ course }}</td>
		    <td>{{ course.teacher }}</td>
                </tr>
		{% endfor %}
                {% endfor %}
            </table>
        </div>
{% endblock %}

